package com.longge;

import java.util.Arrays;

public class MinMovesToSeat {
    public int minMovesToSeat(int[] seats, int[] students) {

        Arrays.sort(seats);
        Arrays.sort(students);
        int n = seats.length - 1;
        int ans = 0;
        while (n >= 0) {
            ans += Math.abs(students[n] - seats[n]);
            n--;
        }
        return ans;
    }

    public static void main(String[] args) {
        String a = "[404] during [POST] to [https://preapi.51lianlian.cn/11111] [LLXHFeignFallbackClient#binding(BindingReq)]: [{\"timestamp\":\"2023-11-18T08:13:33.386+00:00\",\"status\":404,\"error\":\"Not Found\",\"message\":\"\",\"path\":\"/11111\"}]";
        System.out.println(a.length());
        if (a.length()>200){
           a= a.substring(0,200);
        }
        System.out.println(a.length());
        System.out.println(a);
    }
}
